import React from 'react';
import ReactDom from 'react-dom';

class LiPanel extends React.Component{
    constructor(props){
        super(props);

    }

    render(){
        let lis = this.props.list.map(item=><li key={item.id} onClick={()=>this.props.onSelect(item.id)} className={item.selected?'selected': ''}>{item.name}</li>);
        return <ul>
            {lis}
        </ul>;
    }
}

export default LiPanel;
